package com.ost.kautilya.utils.metrics;

import com.ost.kautilya.utils.Metric.DataType;

public class Population extends AbstractMetric {
	private static final long serialVersionUID = 1L;
	private long pop;

	public Population(DataType dt) {
		super(dt);
		pop = 0l;
	}

	@Override
	public void push(long index, Number number) {
		pop += 1;
	}

	@Override
	protected double asDouble() {
		return pop;
	}
	
	@Override
	public void reset() {
		pop = 0l;
	}

}
